package game.buildings;

/**
 *	@(#)House.java
 *
 *	The <code>House</code> class represents the house building.
 *	A house provides one new worker and does not need to be manned.
 *
 *	@author Grzegorz Kobiela
 *	@version 1.0 2008/5/9
 */
public final class House
extends CityBuilding
implements Indexed
{
	/** The index (1 - 20). */
	private int index;

	/**
	 *	Creates a new <code>House</code> instance with the given index.
	 *	@param index the index
	 */
	public House(int index) {
		super(BuildingType.HOUSE);
		this.index = index;
		polygon = new java.awt.Polygon(new int[]{0, 1, 1, 0}, new int[]{0, 0, 1, 1}, 4);
		limitUsed = 0;
		spin = 1;
	}

	/**
	 *	Returns the index.
	 *	@return the index
	 */
	public int getIndex() {
		return index;
	}

	/**
	 *	A house never has graves on it.
	 */
	@Override
	public void addGrave(Grave grave) {}

	/**
	 *	A house never has graves on it.
	 */
	@Override
	public boolean hasGrave(Grave grave) {
		return false;
	}

	/**
	 *	A house never has graves on it.
	 */
	@Override
	public void removeGrave(Grave grave) {}

	/**
	 *	A house never has graves on it.
	 */
	@Override
	public boolean isEnabled() {
		return true;
	}
}